<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>ESP8266_RTOS_SDK: examples/driver_lib/include/gpio.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266_RTOS_SDK
   &#160;<span id="projectnumber">v1.4.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d28a4824dc47e487b107a5db32ef43c4.html">examples</a></li><li class="navelem"><a class="el" href="dir_997368f752113e5dcdcd9718596161d3.html">driver_lib</a></li><li class="navelem"><a class="el" href="dir_5f1d40343f59d40d6b0768ec5b4dc5c7.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">gpio.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * ESPRSSIF MIT License</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Copyright (c) 2015 &lt;ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Permission is hereby granted for use on ESPRESSIF SYSTEMS ESP8266 only, in which case,</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * it is free of charge, to any person obtaining a copy of this software and associated</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * and/or sell copies of the Software, and to permit persons to whom the Software is furnished</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * to do so, subject to the following conditions:</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * </span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be included in all copies or</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * substantial portions of the Software.</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * </span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#ifndef __GPIO_H__</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#define __GPIO_H__</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#define GPIO_Pin_0              (BIT(0))  </span><span class="comment">/* Pin 0 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#define GPIO_Pin_1              (BIT(1))  </span><span class="comment">/* Pin 1 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#define GPIO_Pin_2              (BIT(2))  </span><span class="comment">/* Pin 2 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#define GPIO_Pin_3              (BIT(3))  </span><span class="comment">/* Pin 3 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#define GPIO_Pin_4              (BIT(4))  </span><span class="comment">/* Pin 4 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#define GPIO_Pin_5              (BIT(5))  </span><span class="comment">/* Pin 5 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#define GPIO_Pin_6              (BIT(6))  </span><span class="comment">/* Pin 6 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#define GPIO_Pin_7              (BIT(7))  </span><span class="comment">/* Pin 7 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#define GPIO_Pin_8              (BIT(8))  </span><span class="comment">/* Pin 8 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#define GPIO_Pin_9              (BIT(9))  </span><span class="comment">/* Pin 9 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#define GPIO_Pin_10             (BIT(10)) </span><span class="comment">/* Pin 10 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#define GPIO_Pin_11             (BIT(11)) </span><span class="comment">/* Pin 11 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#define GPIO_Pin_12             (BIT(12)) </span><span class="comment">/* Pin 12 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">#define GPIO_Pin_13             (BIT(13)) </span><span class="comment">/* Pin 13 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#define GPIO_Pin_14             (BIT(14)) </span><span class="comment">/* Pin 14 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor">#define GPIO_Pin_15             (BIT(15)) </span><span class="comment">/* Pin 15 selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#define GPIO_Pin_All            (0xFFFF)  </span><span class="comment">/* All pins selected */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_0          PERIPHS_IO_MUX_GPIO0_U</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_1          PERIPHS_IO_MUX_U0TXD_U</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_2          PERIPHS_IO_MUX_GPIO2_U</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_3          PERIPHS_IO_MUX_U0RXD_U</span></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_4          PERIPHS_IO_MUX_GPIO4_U</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_5          PERIPHS_IO_MUX_GPIO5_U</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_6          PERIPHS_IO_MUX_SD_CLK_U</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_7          PERIPHS_IO_MUX_SD_DATA0_U</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_8          PERIPHS_IO_MUX_SD_DATA1_U</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_9          PERIPHS_IO_MUX_SD_DATA2_U</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_10         PERIPHS_IO_MUX_SD_DATA3_U</span></div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_11         PERIPHS_IO_MUX_SD_CMD_U</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_12         PERIPHS_IO_MUX_MTDI_U</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_13         PERIPHS_IO_MUX_MTCK_U</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_14         PERIPHS_IO_MUX_MTMS_U</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG_15         PERIPHS_IO_MUX_MTDO_U</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="preprocessor">#define GPIO_PIN_REG(i) \</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="preprocessor">    (i==0) ? GPIO_PIN_REG_0:  \</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="preprocessor">    (i==1) ? GPIO_PIN_REG_1:  \</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="preprocessor">    (i==2) ? GPIO_PIN_REG_2:  \</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="preprocessor">    (i==3) ? GPIO_PIN_REG_3:  \</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="preprocessor">    (i==4) ? GPIO_PIN_REG_4:  \</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="preprocessor">    (i==5) ? GPIO_PIN_REG_5:  \</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="preprocessor">    (i==6) ? GPIO_PIN_REG_6:  \</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="preprocessor">    (i==7) ? GPIO_PIN_REG_7:  \</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="preprocessor">    (i==8) ? GPIO_PIN_REG_8:  \</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="preprocessor">    (i==9) ? GPIO_PIN_REG_9:  \</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="preprocessor">    (i==10)? GPIO_PIN_REG_10: \</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="preprocessor">    (i==11)? GPIO_PIN_REG_11: \</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="preprocessor">    (i==12)? GPIO_PIN_REG_12: \</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="preprocessor">    (i==13)? GPIO_PIN_REG_13: \</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="preprocessor">    (i==14)? GPIO_PIN_REG_14: \</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="preprocessor">    GPIO_PIN_REG_15</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="preprocessor">#define GPIO_PIN_ADDR(i)        (GPIO_PIN0_ADDRESS + i*4)</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="preprocessor">#define GPIO_ID_IS_PIN_REGISTER(reg_id) \</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="preprocessor">    ((reg_id &gt;= GPIO_ID_PIN0) &amp;&amp; (reg_id &lt;= GPIO_ID_PIN(GPIO_PIN_COUNT-1)))</span></div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="preprocessor">#define GPIO_REGID_TO_PINIDX(reg_id) ((reg_id) - GPIO_ID_PIN0)</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    GPIO_PIN_INTR_DISABLE = 0,      </div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    GPIO_PIN_INTR_POSEDGE = 1,      </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    GPIO_PIN_INTR_NEGEDGE = 2,      </div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    GPIO_PIN_INTR_ANYEDGE = 3,      </div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    GPIO_PIN_INTR_LOLEVEL = 4,      </div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    GPIO_PIN_INTR_HILEVEL = 5       </div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;} GPIO_INT_TYPE;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    GPIO_Mode_Input = 0x0,          </div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    GPIO_Mode_Out_OD,               </div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    GPIO_Mode_Output ,              </div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    GPIO_Mode_Sigma_Delta ,         </div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;} GPIOMode_TypeDef;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    GPIO_PullUp_DIS = 0x0,      </div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    GPIO_PullUp_EN  = 0x1,      </div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;} GPIO_Pullup_IF;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="structGPIO__ConfigTypeDef.html">  113</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="structGPIO__ConfigTypeDef.html#ab88f866e27ec419ab320a38bd8ce4db9">  114</a></span>&#160;    uint16           <a class="code" href="structGPIO__ConfigTypeDef.html#ab88f866e27ec419ab320a38bd8ce4db9">GPIO_Pin</a>;      </div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="structGPIO__ConfigTypeDef.html#a0c7e8901d8b511bbb8c3b153f705dbba">  115</a></span>&#160;    GPIOMode_TypeDef <a class="code" href="structGPIO__ConfigTypeDef.html#a0c7e8901d8b511bbb8c3b153f705dbba">GPIO_Mode</a>;     </div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="structGPIO__ConfigTypeDef.html#a4397d9dc86f357d68e92846f74ea6a1f">  116</a></span>&#160;    GPIO_Pullup_IF   <a class="code" href="structGPIO__ConfigTypeDef.html#a4397d9dc86f357d68e92846f74ea6a1f">GPIO_Pullup</a>;   </div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="structGPIO__ConfigTypeDef.html#a9888e40b7e27b35c3408f5056e12c5e0">  117</a></span>&#160;    GPIO_INT_TYPE    <a class="code" href="structGPIO__ConfigTypeDef.html#a9888e40b7e27b35c3408f5056e12c5e0">GPIO_IntrType</a>; </div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;} <a class="code" href="structGPIO__ConfigTypeDef.html">GPIO_ConfigTypeDef</a>;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div>
<div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="group__GPIO__Driver__APIs.html#ga2cc3f29ed0d46de6cbd2f013281881a6">  144</a></span>&#160;<span class="preprocessor">#define GPIO_OUTPUT_SET(gpio_no, bit_value) \</span></div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;<span class="preprocessor">    gpio_output_conf(bit_value&lt;&lt;gpio_no, ((~bit_value)&amp;0x01)&lt;&lt;gpio_no, 1&lt;&lt;gpio_no, 0)</span></div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div>
<div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="group__GPIO__Driver__APIs.html#gae42853d0b143e451a9ad05465b353538">  155</a></span>&#160;<span class="preprocessor">#define GPIO_OUTPUT(gpio_bits, bit_value) \</span></div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;<span class="preprocessor">    if(bit_value) gpio_output_conf(gpio_bits, 0, gpio_bits, 0);\</span></div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;<span class="preprocessor">    else gpio_output_conf(0, gpio_bits, gpio_bits, 0)</span></div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div>
<div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="group__GPIO__Driver__APIs.html#gadc761184e3d3dbcac5088b099bb809cc">  166</a></span>&#160;<span class="preprocessor">#define GPIO_DIS_OUTPUT(gpio_no)    gpio_output_conf(0, 0, 0, 1&lt;&lt;gpio_no)</span></div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div>
<div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="group__GPIO__Driver__APIs.html#gae1dba8cd1835b53c3e8f19ed03704678">  175</a></span>&#160;<span class="preprocessor">#define GPIO_AS_INPUT(gpio_bits)    gpio_output_conf(0, 0, 0, gpio_bits)</span></div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;</div>
<div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="group__GPIO__Driver__APIs.html#ga42af7fcc6e27fda6e62210c756d859f5">  184</a></span>&#160;<span class="preprocessor">#define GPIO_AS_OUTPUT(gpio_bits)   gpio_output_conf(0, 0, gpio_bits, 0)</span></div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div>
<div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="group__GPIO__Driver__APIs.html#gaa633831c2027196743ccd277cbf75572">  193</a></span>&#160;<span class="preprocessor">#define GPIO_INPUT_GET(gpio_no)     ((gpio_input_get()&gt;&gt;gpio_no)&amp;BIT0)</span></div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__GPIO__Driver__APIs.html#gaf94c9f201c7ee9ad7a71b5eb8b720b00">gpio16_output_conf</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__GPIO__Driver__APIs.html#ga4f83a12f673ab6e664c6ea129a1ca9c2">gpio16_output_set</a>(uint8 value);</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__GPIO__Driver__APIs.html#gacc7e5be6c1aed84fe3c3260deea64a3e">gpio16_input_conf</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;uint8 <a class="code" href="group__GPIO__Driver__APIs.html#ga4484530a542760c430ebb2e754b6e621">gpio16_input_get</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__GPIO__Driver__APIs.html#gad57551861ccb3b7f4d16c0de00717e29">gpio_output_conf</a>(uint32 set_mask, uint32 clear_mask, uint32 enable_mask, uint32 disable_mask);</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__GPIO__Driver__APIs.html#ga7b94b7d43c84a8177f4301b6a001fae3">gpio_intr_handler_register</a>(<span class="keywordtype">void</span> *fn, <span class="keywordtype">void</span> *arg);</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__GPIO__Driver__APIs.html#gae37bc72b183440f9733f14df516cee7b">gpio_pin_wakeup_enable</a>(uint32 i, GPIO_INT_TYPE intr_state);</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__GPIO__Driver__APIs.html#gaffbe088057472f44ddf99c7912f54300">gpio_pin_wakeup_disable</a>();</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__GPIO__Driver__APIs.html#ga0adef8a3e9d5c302d96d1ddc360f7c79">gpio_pin_intr_state_set</a>(uint32 i, GPIO_INT_TYPE intr_state);</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;uint32 <a class="code" href="group__GPIO__Driver__APIs.html#ga678824698fa5936b7928c24c6cfd0a17">gpio_input_get</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;}</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="group__GPIO__Driver__APIs_html_ga4f83a12f673ab6e664c6ea129a1ca9c2"><div class="ttname"><a href="group__GPIO__Driver__APIs.html#ga4f83a12f673ab6e664c6ea129a1ca9c2">gpio16_output_set</a></div><div class="ttdeci">void gpio16_output_set(uint8 value)</div><div class="ttdoc">Set GPIO16 output level. </div></div>
<div class="ttc" id="group__GPIO__Driver__APIs_html_ga678824698fa5936b7928c24c6cfd0a17"><div class="ttname"><a href="group__GPIO__Driver__APIs.html#ga678824698fa5936b7928c24c6cfd0a17">gpio_input_get</a></div><div class="ttdeci">uint32 gpio_input_get(void)</div><div class="ttdoc">Sample the value of GPIO input pins and returns a bitmask. </div></div>
<div class="ttc" id="structGPIO__ConfigTypeDef_html_ab88f866e27ec419ab320a38bd8ce4db9"><div class="ttname"><a href="structGPIO__ConfigTypeDef.html#ab88f866e27ec419ab320a38bd8ce4db9">GPIO_ConfigTypeDef::GPIO_Pin</a></div><div class="ttdeci">uint16 GPIO_Pin</div><div class="ttdef"><b>Definition:</b> gpio.h:114</div></div>
<div class="ttc" id="structGPIO__ConfigTypeDef_html_a4397d9dc86f357d68e92846f74ea6a1f"><div class="ttname"><a href="structGPIO__ConfigTypeDef.html#a4397d9dc86f357d68e92846f74ea6a1f">GPIO_ConfigTypeDef::GPIO_Pullup</a></div><div class="ttdeci">GPIO_Pullup_IF GPIO_Pullup</div><div class="ttdef"><b>Definition:</b> gpio.h:116</div></div>
<div class="ttc" id="group__GPIO__Driver__APIs_html_gae37bc72b183440f9733f14df516cee7b"><div class="ttname"><a href="group__GPIO__Driver__APIs.html#gae37bc72b183440f9733f14df516cee7b">gpio_pin_wakeup_enable</a></div><div class="ttdeci">void gpio_pin_wakeup_enable(uint32 i, GPIO_INT_TYPE intr_state)</div><div class="ttdoc">Configure GPIO wake up to light sleep,Only level way is effective. </div></div>
<div class="ttc" id="group__GPIO__Driver__APIs_html_gaf94c9f201c7ee9ad7a71b5eb8b720b00"><div class="ttname"><a href="group__GPIO__Driver__APIs.html#gaf94c9f201c7ee9ad7a71b5eb8b720b00">gpio16_output_conf</a></div><div class="ttdeci">void gpio16_output_conf(void)</div><div class="ttdoc">Enable GPIO16 output. </div></div>
<div class="ttc" id="group__GPIO__Driver__APIs_html_ga4484530a542760c430ebb2e754b6e621"><div class="ttname"><a href="group__GPIO__Driver__APIs.html#ga4484530a542760c430ebb2e754b6e621">gpio16_input_get</a></div><div class="ttdeci">uint8 gpio16_input_get(void)</div><div class="ttdoc">Sample the value of GPIO16 input. </div></div>
<div class="ttc" id="structGPIO__ConfigTypeDef_html"><div class="ttname"><a href="structGPIO__ConfigTypeDef.html">GPIO_ConfigTypeDef</a></div><div class="ttdef"><b>Definition:</b> gpio.h:113</div></div>
<div class="ttc" id="group__GPIO__Driver__APIs_html_ga0adef8a3e9d5c302d96d1ddc360f7c79"><div class="ttname"><a href="group__GPIO__Driver__APIs.html#ga0adef8a3e9d5c302d96d1ddc360f7c79">gpio_pin_intr_state_set</a></div><div class="ttdeci">void gpio_pin_intr_state_set(uint32 i, GPIO_INT_TYPE intr_state)</div><div class="ttdoc">Config interrupt types of GPIO pin. </div></div>
<div class="ttc" id="structGPIO__ConfigTypeDef_html_a9888e40b7e27b35c3408f5056e12c5e0"><div class="ttname"><a href="structGPIO__ConfigTypeDef.html#a9888e40b7e27b35c3408f5056e12c5e0">GPIO_ConfigTypeDef::GPIO_IntrType</a></div><div class="ttdeci">GPIO_INT_TYPE GPIO_IntrType</div><div class="ttdef"><b>Definition:</b> gpio.h:117</div></div>
<div class="ttc" id="structGPIO__ConfigTypeDef_html_a0c7e8901d8b511bbb8c3b153f705dbba"><div class="ttname"><a href="structGPIO__ConfigTypeDef.html#a0c7e8901d8b511bbb8c3b153f705dbba">GPIO_ConfigTypeDef::GPIO_Mode</a></div><div class="ttdeci">GPIOMode_TypeDef GPIO_Mode</div><div class="ttdef"><b>Definition:</b> gpio.h:115</div></div>
<div class="ttc" id="group__GPIO__Driver__APIs_html_gacc7e5be6c1aed84fe3c3260deea64a3e"><div class="ttname"><a href="group__GPIO__Driver__APIs.html#gacc7e5be6c1aed84fe3c3260deea64a3e">gpio16_input_conf</a></div><div class="ttdeci">void gpio16_input_conf(void)</div><div class="ttdoc">Enable GPIO pin intput. </div></div>
<div class="ttc" id="group__GPIO__Driver__APIs_html_gad57551861ccb3b7f4d16c0de00717e29"><div class="ttname"><a href="group__GPIO__Driver__APIs.html#gad57551861ccb3b7f4d16c0de00717e29">gpio_output_conf</a></div><div class="ttdeci">void gpio_output_conf(uint32 set_mask, uint32 clear_mask, uint32 enable_mask, uint32 disable_mask)</div><div class="ttdoc">Configure Gpio pins out or input. </div></div>
<div class="ttc" id="group__GPIO__Driver__APIs_html_gaffbe088057472f44ddf99c7912f54300"><div class="ttname"><a href="group__GPIO__Driver__APIs.html#gaffbe088057472f44ddf99c7912f54300">gpio_pin_wakeup_disable</a></div><div class="ttdeci">void gpio_pin_wakeup_disable()</div><div class="ttdoc">Disable GPIO wake up to light sleep. </div></div>
<div class="ttc" id="group__GPIO__Driver__APIs_html_ga7b94b7d43c84a8177f4301b6a001fae3"><div class="ttname"><a href="group__GPIO__Driver__APIs.html#ga7b94b7d43c84a8177f4301b6a001fae3">gpio_intr_handler_register</a></div><div class="ttdeci">void gpio_intr_handler_register(void *fn, void *arg)</div><div class="ttdoc">Register an application-specific interrupt handler for GPIO pin interrupts. </div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Mar 1 2016 10:19:26 for ESP8266_RTOS_SDK by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
